package apis

import (
	"net/http"

	"ginDemo/common/retmsg"

	"gitee.com/clearluo/gotools/util"

	"gitee.com/clearluo/gotools/zaplog"

	"github.com/gin-gonic/gin"
)

func ping(r *gin.Context) {
	reqBody := util.GetBody(r.Request)
	zaplog.Infof("[from]%v [req]%v [msg]%v", r.Request.RemoteAddr, util.FuncName(), string(reqBody))
	msg := retmsg.OK.Return()
	defer func() {
		r.JSON(http.StatusOK, msg)
	}()
	retData := map[string]interface{}{
		"abc": "adfsdfd",
	}
	msg.Data = retData
}
